<%@page import="cn.lily.web.util.config.WebSetting"%>
<%@ page contentType="text/html; charset=utf-8"%>
<%@ page import="cn.lily.inst.web.frames.FrameConfig" %>
<%@ page import="cn.lily.inst.web.security.SystemManager" %>
<%@ page import="cn.lily.web.util.context.WebContext" %>
<%@ page import="cn.lily.esb.context.AuthEntity" %>
<%@ page import="cn.lily.com.lang.BusinessDate" %>
<%@page import="cn.lily.com.db.container.reader.DataTable"%>
<%@page import="cn.lily.com.db.DBFactory"%>
<%@page import="cn.lily.com.db.sql.DBManager"%>
<%@ page import="cn.lily.com.configure.util.ESBSetting"%>
<%@ include file="../security/loginassistor.jsp"%>

<%
	String hintStr = "";
	String topMenuStr = "";
	String skinName = "";
	String operid = "";
	String welcomepage = "";
    String operInfo="";
    String appid=WebSetting.getString("single_id");
    String appname="";

	String exitUrl = "";
	AuthEntity authEntity = (AuthEntity) session.getAttribute(WebContext.LOG_AUTH_CONTEXT);
	if (authEntity != null) {
		hintStr = authEntity.getOperatorName();
		skinName = authEntity.getSkinName();
		operid = authEntity.getOperatorId();
		welcomepage = authEntity.getWelcomePage();
		exitUrl = authEntity.getExitUrl();
        if("9999".equals(authEntity.getOperatorId())){
          operInfo=authEntity.getOperatorName();
        }else{
          operInfo=authEntity.getOperEntity().getCommEntity().getCommName()+"&nbsp;/&nbsp;"+authEntity.getOperatorName();
        }
	}
 %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<%@ include file="/global.jsp"%>
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta charset="UTF-8">
<title><%=FrameConfig.getAppName()%></title>
<link rel="shortcut icon" href="<%=contextPath%>/images/logo.ico" type="/image/x-icon" />
<link href="<%=contextPath + FrameConfig.getStylePath()%>strap/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="<%=contextPath + FrameConfig.getStylePath()%>font-awesome/css/font-awesome.min.css" rel="stylesheet">
<link href="<%=FrameConfig.getCSSPath("index.css")%>" rel="stylesheet" />
</head>
<body>
  <div id="header" class="row">
    <div class="header-bg-right"></div>
    <div class="header-logo">
      <img src="<%=FrameConfig.getFramePath("logo.png")%>" alt="" />
    </div>
    <div id="header-login-info">
      <ul>
        <li>欢迎【<%=operInfo %>】登录系统!&nbsp;&nbsp;</li>
        <li>今天：<%=BusinessDate.getToday() %>&nbsp;<%=BusinessDate.getWeekDay() %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</li>
        <li class="link" onclick="changeinfo()">设置</li>
        <li class="line">|</li>
        <li class="link">帮助</li>
        <li class="line">|</li>
        <li class="link" onclick="exit()">退出</li>
      </ul>
    </div>
    <div id="header-menu">
      <div class="tabbable">
        <ul id="tab-menu" class="nav nav-tabs">
          <li id="tab-index" class="active" style="margin-left: 20px; height:30px;"></li>
        </ul>
      </div>
    </div>
  </div>
  <div id="body" class="tab-content">
    <div class="tab-pane active" id="condent-index">
      <iframe src="appindex.jsp" width="100%" frameborder="0" scrolling="no" height="99%"></iframe>
    </div>
  </div>

  <script src="<%=FrameConfig.getBaseJsUrl()%>common/jquery-1.9.1.min.js"></script>
  <script src="/<%=ESBSetting.getString("appCode")%>/public/js/skin_bootstrap/bootstrap-3.3.0/bootstrap-3.3.0.js"></script>
  <script src="<%=FrameConfig.getJsUrl("index.js")%>"></script>
  <script type="text/javascript">
  	var pwdUpdate="<%=authEntity.getOperEntity().getPwdUpdate()%>";
  	if(pwdUpdate=="0"){
  		changeinfo();
  	}
  	function exit(){
		window.location.replace("<%=exitUrl%>");
	}
  	function changeinfo(){
  		var dialogArg = "dialogwidth:350px; Dialogheight:200px;center:yes;help:no;resizable:no;scroll:no;status:no";
		var arg = new Object();
 		arg.top =  window.top;
		var  dd    = window.showModalDialog(contextPath +"/UI/portal/system/user/changeinfo.jsp",arg, dialogArg);
	}
  </script>
</body>
</html>

